Moving from Specifications to Contracts in Component-Based Design
نویسندگان
چکیده
We study the relation between specifications of component behaviors and contracts providing means to specify assumptions on environments as well as component guarantees. We show how a contract framework can be built in a generic way on top of any specification theory which supports composition and specification refinement. Our contract framework lifts refinement to the level of contracts and proposes a notion of contract composition on the basis of dominating contracts. Contract composition satisfies a universal property and can be constructively defined if the underlying specification theory is complete, i.e. it offers operators for quotienting and conjoining specifications. We illustrate our generic construction of contracts by moving a specification theory for modal transition systems to contracts and we show that a (previously proposed) trace-based contract theory is an instance of our framework.
منابع مشابه
The B Method and the Component-Based Approach
The aim of this paper is to merge two approaches of software development: the component approach and the formal development approach. Developping software components is now a technique widely used by the software industry. These two approaches are not so distant if we consider Bertrand Meyer’s opinion: it is more complicated to reuse a component without contracts. One of the difficulties with t...
متن کاملSupporting Behavioral Contracts for COM Components
Specifying behavioral specifications for components apart from the conventional syntactic interface specifications can be very useful in component based system development. Preconditions and postconditions describe one form of behavioral aspects of components. We discuss a tool and an implementation mechanism to incorporate behavioral contracts expressed in terms of preconditions and postcondit...
متن کاملInterface Suites as Contracts. Composition of Contracts in UML
We present a tool for composition of component specifications. The tool uses UML diagrams to model the composition. A fixed component specification is a contract between some roles communicating via interfaces. A contract has a specific underlying model that we present. Composition of contracts is a contract that extends contracts of composites, but does not change them. To guarantee this featu...
متن کاملManaged Assertions for Component Contracts
Behavioral specifications in interface contracts are important measures for improving quality of software components. Binary components of different language origins need a common understanding of behavioral contracts to work effectively in component-based systems. We propose a system by which behavioral specifications in the spirit of Design by Contract can accompany binary components and be a...
متن کاملA Methodology for Writing Class Contracts
One of the principles of Design by Contract is that contracts for software components must be written in a declarative way, using a formal, mathematically founded notation. When we apply the Design by Contract methodology in a naive and straightforward way, we risk ending up with unwanted duplication. In this paper, we describe a methodology for writing class contracts that avoids specification...
متن کامل